package com.foo.designpattern.state.state1;

/**
 * com.foo.designpattern.state.state1
 * Created with IntelliJ IDEA.
 * Created by jiang on 2016-06-08 16:57.
 *
 * @Description 具体状态(ConcreteState)角色
 * 每一个具体类都实现了环境(Context)的一个状态所对应的行为
 */

public class SpiteVoteState implements VoteState {
    @Override
    public void vote(String user, String voteItem, VoteManager manager) {
        String s = manager.getMapVote().get(user);
        if (null != s) {
            manager.getMapVote().remove(user);
        }
        System.out.println("你有恶意刷票行为，取消投票资格！");
    }
}
